package com.tjec.project.projectWorkbench.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjec.project.projectWorkbench.mapper.BmsBusinessOperMapper;
import com.tjec.project.projectWorkbench.domain.BmsBusinessOper;
import com.tjec.project.projectWorkbench.service.IBmsBusinessOperService;

/**
 * 业务操作记录Service业务层处理
 * 
 * @author pangyongfeng
 * @date 2021-01-05
 */
@Service
public class BmsBusinessOperServiceImpl implements IBmsBusinessOperService 
{
    @Autowired
    private BmsBusinessOperMapper bmsBusinessOperMapper;

    /**
     * 查询业务操作记录
     * 
     * @param guid 业务操作记录ID
     * @return 业务操作记录
     */
    @Override
    public BmsBusinessOper selectBmsBusinessOperByGuid(String guid)
    {
        return bmsBusinessOperMapper.selectBmsBusinessOperByGuid(guid);
    }

    /**
     * 查询业务操作记录列表
     * 
     * @param bmsBusinessOper 业务操作记录
     * @return 业务操作记录
     */
    @Override
    public List<BmsBusinessOper> selectBmsBusinessOperList(BmsBusinessOper bmsBusinessOper)
    {
        return bmsBusinessOperMapper.selectBmsBusinessOperList(bmsBusinessOper);
    }

    /**
     * 新增业务操作记录
     * 
     * @param bmsBusinessOper 业务操作记录
     * @return 结果
     */
    @Override
    public int insertBmsBusinessOper(BmsBusinessOper bmsBusinessOper)
    {
    	if("1".equals(bmsBusinessOper.getOperType())) {
    		return bmsBusinessOperMapper.insertBmsBusinessOper(bmsBusinessOper);
    	}
    	return bmsBusinessOperMapper.insertBmsBusinessOper(bmsBusinessOper);
    }

}
